package dormouse.vfs.ui.actions;

import javax.swing.ActionMap;
import javax.swing.JPopupMenu;

import org.apache.commons.vfs2.FileObject;
import org.jdesktop.application.Application;

/**
 * This factory is responsible for creating a popup menu containing menu items
 * that are appropriate for the selected file.
 */
public class ActionFactory {
    
    public static JPopupMenu getMenu(FileObject file){
        JPopupMenu menu = new JPopupMenu();
        ActionMap map = Application.getInstance().getContext().getActionMap();
        menu.add(map.get("CutFileAction"));
        menu.add(map.get("CopyFileAction"));
        menu.add(map.get("DeleteFileAction"));
        //menu.add(new PasteFileAction(Application.getInstance()));
        menu.add(map.get("EmailFileAction"));
        return menu;
    }
    
    public static JPopupMenu getMenu(FileObject[] fileList){
        JPopupMenu menu = new JPopupMenu();
        
        return menu;
    }

}
